using System.Collections.Generic;
using DuplexTransformers;
using NUnit.Framework;

namespace DuplexTransformersTests
{
    [TestFixture]
    public class TypeIdentification
    {
        [Test]
        public void CanIdentifyListType()
        {
            Assert.IsTrue(typeof(IList<string>).IsGenericList());
            Assert.IsFalse(typeof(string).IsGenericList());
        }

        [Test]
        public void CanGetListItemType()
        {
            Assert.AreEqual(typeof(string), typeof(IList<string>).GetListItemType());
        }
    }
}